﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace TestWPF
{
public class Product : INotifyPropertyChanged
{
    private int _productId = 10;

    public int ProductId
    {
        get { return _productId; }
        set { _productId = value; OnPropertyChanged("ProductId"); }
    }

    public event PropertyChangedEventHandler PropertyChanged;

    private void OnPropertyChanged(String info)
    {
        PropertyChangedEventHandler handler = PropertyChanged;
        if (handler != null)
        {
            handler(this, new PropertyChangedEventArgs(info));
        }
    }    
}
}
